<!-- php:$title ="我的财富 - 会员中心"  -->
<!-- include tpl=header title=$title -->
<script type="text/javascript">
function payit(id,title)
{
	$.dialog.prompt('请输入要充值的金额（仅支持整数，最小充值1元）：',function(val){
		if(val < 1){
			$.dialog.alert('充值金额不能少于1元');
			return false;
		}
		var url = get_url('payment','index','id='+id+"&price="+$.str.encode(val));
		$.phpok.go(url);
	},10).title('在线充值');
}
</script>
<div class="main">
	<!-- include tpl=block/breadcrumb -->
	<div class="left"><!-- include tpl=block/usercp_nav --></div>
	<div class="right">
		<div class="am-panel am-panel-default">
			<div class="am-panel-hd">我的财富</div>
			<table class="am-table">
				<tbody>
					<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
					<tr>
						<td>
							<div><b>{$value.title}</b>，您当前有 <span class="red">{$value.val}</span> {$value.unit}</div>
							<!-- if $value.ifpay -->
							<div class="gray">充值比例：1元人民币 = {$value.pay_ratio} {$value.unit}</div>
							<!-- /if -->
							<!-- if $value.ifcash && !$value.ifpay -->
							<div class="gray">抵现比例：100{$value.unit} = {$value.cash_ratio}元人民币，可用于抵扣购物金额</div>
							<!-- /if -->
						</td>
						<td class="am-text-center">
							<!-- if $value.ifpay --><input type="button" value="充值" class="am-btn am-btn-primary am-btn-sm" onclick="payit('{$value.id}','{$value.title}')" /><!-- /if -->
						</td>
						<td class="am-text-center">
							<a href="{url ctrl=usercp func=wealth_log id=$value.id/}" class="am-btn am-btn-primary am-btn-sm">日志</a>
						</td>
					</tr>
					<!-- /loop -->
				</tbody>
			</table>
		</div>
	</div>
	<div class="clear"></div>
</div>
<!-- include tpl=footer -->